# 安装 pip install requests
# PS E:\reptile-python> pip install requests
# Requirement already satisfied: requests in c:\program files\python310\lib\site-packages (2.27.1)
# Requirement already satisfied: certifi>=2017.4.17 in c:\program files\python310\lib\site-packages (from requests) (2021.10.8)
# Requirement already satisfied: charset-normalizer~=2.0.0 in c:\program files\python310\lib\site-packages (from requests) (2.0.12)
# Requirement already satisfied: idna<4,>=2.5 in c:\program files\python310\lib\site-packages (from requests) (3.3)
# Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\program files\python310\lib\site-packages (from requests) (1.26.9)
import requests

response = requests.get(url='https://www.baidu.com/')
response.encoding = 'UTF-8'
print(response.text)
print(response.status_code)
print(response.headers)
print(response.url)

